package org.ohuyo.libra.server.model.table;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Index;

/**
 * �ͻ���Ϊ��¼��
 * 
 * @author rabbit
 * @time ����09:58:51 2009-7-31
 */
@Entity
@Table(name = "T_ACTION")
@org.hibernate.annotations.Table(appliesTo = "T_ACTION", indexes = {
		@Index(name = "idx_action1", columnNames = { "LOGIN_TICKET" }),
		@Index(name = "idx_action2", columnNames = { "GEN_TIME" }) })
public class ActionRecord implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 539466028152184220L;

	/**
	 * ����
	 */
	@Id
	@TableGenerator(name = "t_action", table = "t_libra_seq", pkColumnName = "seq_name", pkColumnValue = "t_action", valueColumnName = "next_value", initialValue = 0, allocationSize = 100)
	@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "t_action")
	@Column(name = "i_action", nullable = false, updatable = false)
	private Long iAction;

	/**
	 * ��½��ˮ��
	 * 
	 * @FIXME ��������
	 */
	@Column(name = "login_ticket", nullable = false, updatable = false)
	private Long loginTicket;
	/**
	 * ���״���
	 */
	@Column(name = "msg_code", columnDefinition = "varchar(20)", nullable = false, updatable = false)
	private String msgCode;
	/**
	 * ������ˮ��
	 */
	@Column(name = "msg_ticket", columnDefinition = "char(32)", nullable = false, updatable = false)
	private String msgTicket;

	/**
	 * ����Ӧ�ô���
	 */
	@Column(name = "APP_CODE", columnDefinition = "varchar(20)", updatable = false)
	private String appCode;
	/**
	 * ���𷽿ͻ�ID����
	 */
	@Column(name = "CUST_ID_TYPE", columnDefinition = "varchar(20)", updatable = false)
	private String custIdType;
	/**
	 * ���𷽿ͻ�ID
	 */
	@Column(name = "CUST_ID", columnDefinition = "varchar(50)", updatable = false)
	private String custId;
	/**
	 * Ӧ��Ʊ��
	 */
	@Column(name = "APP_TICKET", updatable = false)
	private Long appTicket;
	/**
	 * ������תƱ��
	 */
	@Column(name = "JUMP_TICKET", updatable = false)
	private Long jumpTicket;
	/**
	 * Ŀ�귽Ӧ�ô���
	 */
	@Column(name = "TARGET_APP_CODE", columnDefinition = "varchar(20)", updatable = false)
	private String targetAppCode;

	/**
	 * Ŀ�귽Ӧ�ô���
	 */
	@Column(name = "client_ticket", updatable = false)
	private Long clientTicket;
	/**
	 * ����ʱ��
	 */
	@Column(name = "GEN_TIME", nullable = false, updatable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date genTime;

	public Long getiAction() {
		return iAction;
	}

	public void setiAction(Long iAction) {
		this.iAction = iAction;
	}

	public Long getLoginTicket() {
		return loginTicket;
	}

	public void setLoginTicket(Long loginTicket) {
		this.loginTicket = loginTicket;
	}

	public String getMsgCode() {
		return msgCode;
	}

	public void setMsgCode(String txnCode) {
		this.msgCode = txnCode;
	}

	public String getMsgTicket() {
		return msgTicket;
	}

	public void setMsgTicket(String txnTicket) {
		this.msgTicket = txnTicket;
	}

	public String getAppCode() {
		return appCode;
	}

	public void setAppCode(String appCode) {
		this.appCode = appCode;
	}

	public String getCustIdType() {
		return custIdType;
	}

	public void setCustIdType(String custIdType) {
		this.custIdType = custIdType;
	}

	public String getCustId() {
		return custId;
	}

	public void setCustId(String custId) {
		this.custId = custId;
	}

	public Long getAppTicket() {
		return appTicket;
	}

	public void setAppTicket(Long appTicket) {
		this.appTicket = appTicket;
	}

	public Long getJumpTicket() {
		return jumpTicket;
	}

	public void setJumpTicket(Long jumpTicket) {
		this.jumpTicket = jumpTicket;
	}

	public String getTargetAppCode() {
		return targetAppCode;
	}

	public void setTargetAppCode(String targetAppCode) {
		this.targetAppCode = targetAppCode;
	}

	public Date getGenTime() {
		return genTime;
	}

	public void setGenTime(Date genTime) {
		this.genTime = genTime;
	}

	/**
	 * @param clientTicket
	 *            the clientTicket to set
	 */
	public void setClientTicket(Long clientTicket) {
		this.clientTicket = clientTicket;
	}

	/**
	 * @return the clientTicket
	 */
	public Long getClientTicket() {
		return clientTicket;
	}

}
